<template>
  <div>
    <swiper-list :list="swiperList"></swiper-list>
  </div>
</template>
<script>
/* eslint-disable */
import SwiperList from "./components/List.vue";
import axios from "axios";
export default {
  name: "Swiper",
  components: {
    SwiperList,
  },
  data() {
    return {
      swiperList: [],
    };
  },
  methods: {
    getSwiper: function () {
      console.log("从数据库中获取数据");
      axios.defaults.baseURL = process.env.BASE_API;
      console.log(process.env.BASE_API);
      axios.get("/api/swiper/list").then(this.getSwiperSucc);
    },
    getSwiperSucc(res) {
      this.swiperList = res.data;
    },
  },
  mounted() {
    this.getSwiper();
  },
};
</script>
<style scoped>
</style>
